A processor core may be designed to execute code written in a particular coding language. In order to have a program executed by a particular core, program code may need to be translated from a first coding language that is incompatible with the particular core to a second coding language that is compatible with the particular core, known as binary translation.
Self modifying code (SMC) refers to code that becomes modified during execution, e.g., one or more instructions of the SMC upon execution modify other instructions of the SMC. Cross modifying code (XMC) refers to first code that is executable on a first processor core and that when executed causes modifications to second code that is executable on a second processor core. SMC or XMC may be partially translated or entirely translated prior to execution. Translation of several instructions prior to their execution may introduce anomalies in the translated code, as compared with translation and execution of each instruction prior to advancement to the next instruction. The anomalies in the translated code can result in mistakes in output.